How to Create a 'Conditional Object' in a Layout Table Report

Description

When creating Free-form reports, the Conditional Object control is used to dynamically display content. When designing Layout Table reports, the same functionality can be created with Static HTML.

Discussion

Conditional objects can be added to a Layout Table report by defining the contents of a cell as "Static HTML". Using command directives, you can create a conditional statement that will determine the fields to display in the cell. The {if expression}...{else}...{endif} command directives can be used to conditionally select content to display in the report.

{if Ship_Same}
Show <b>billing</b> address<br>
{begin:SuppressBlankLines}
{bill_address_1}<br>
{bill_address_2}<br>
{bill_city} {bill_state_region} {bill_postal_code}
{end:SuppressBlankLines}
{else}
Show <b>shipping</b> address<br>
{begin:SuppressBlankLines}
{ship_address_1}<br>
{ship_address_2}<br>
{ship_city} {ship_state_region} {ship_postal_code}
{end:SuppressBlankLines}
{endif}

For more information and complete step-by-step instructions for creating conditional objects in a Layout Table report using Static HTML, watch the video below: